
package com.dhcc.bpm.modules.content.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.common.entity.Upload;
import com.dhcc.bpm.modules.content.entity.DocDirectory;
import com.dhcc.bpm.modules.content.entity.DocManagement;
import com.dhcc.bpm.modules.content.vo.DocDirectoryVO;
import org.springblade.core.mp.base.BaseService;

import java.util.List;

/**
 * @ClassName IDocDirectoryService
 * @Description  文档目录 服务类
 * @Author lijiacheng
 * @Date 2020/2/21 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */

public interface IDocDirectoryService extends BaseService<DocDirectory> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param docDirectory
	 * @return
	 */
	IPage<DocDirectoryVO> selectDocDirectoryPage(IPage<DocDirectoryVO> page, DocDirectoryVO docDirectory);

	/**
	 * 获取文档目录树形结构
	 * @return
	 */
    List<DocDirectoryVO> tree();


	/**
	 * 添加文档发布文件
	 * @param path
	 * @param opcDirectoryCode
	 * @return
	 */
	int synInsertDirectory(String path, String opcDirectoryCode);

	/**
	 * 创建文件夹并保存文件
	 * @param docManagement
	 */
	String saveDocFile(DocManagement docManagement, Upload upload);

	/**
	 * 删除文档目录ByProductCode
	 * @param productCode
	 */
	int removeDocByProductCode(String productCode);
	/**
	 * 下线文档目录ByProductCode
	 * @param productCode
	 */
	int updateDocByProductCode(String productCode);

	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/4/21 17:05
	 * @param docCode
	 * @return com.dhcc.bpm.modules.content.vo.DocDirectoryVO
	 * @throws
	 **/
	DocDirectoryVO findByDocCode(String docCode, String productCode, String apiId);
	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/4/21 17:05
	 * @param docCode
	 * @return com.dhcc.bpm.modules.content.vo.DocDirectoryVO
	 * @throws
	 **/
	List<DocDirectoryVO> findByApiCode(String docCode);
	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/4/21 17:05
	 * @param docDirectory
	 * @return com.dhcc.bpm.modules.content.vo.DocDirectoryVO
	 * @throws
	 **/
	DocDirectoryVO findByDocCode(DocDirectory docDirectory);
}
